#pragma once

#include "Entity.h"
#include <list>
#include "Defines.h"
#include "Singleton.h"
#include <sfml/Graphics.hpp>

class EntityManager
{
public:
	EntityManager();
	~EntityManager();

	void AddEntity(Entity* entity);
	void RemoveEntity(Entity* entity);		//expensive O(n)
	inline void SetRenderWindow(sf::RenderWindow* window) { m_window = window; }
	
	void Update(uint16 diff);

private:
	typedef std::list<Entity*> EntityList;
	EntityList m_entities;
	sf::RenderWindow* m_window;

};
